diff options
Diffstat (limited to 'app/[lng]/evcp/(evcp)/bid/[id]/layout.tsx')
| -rw-r--r-- | app/[lng]/evcp/(evcp)/bid/[id]/layout.tsx | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/app/[lng]/evcp/(evcp)/bid/[id]/layout.tsx b/app/[lng]/evcp/(evcp)/bid/[id]/layout.tsx index 490f1360..5c4e9b99 100644 --- a/app/[lng]/evcp/(evcp)/bid/[id]/layout.tsx +++ b/app/[lng]/evcp/(evcp)/bid/[id]/layout.tsx @@ -2,7 +2,7 @@ import { Metadata } from "next" import { Separator } from "@/components/ui/separator" import { SidebarNav } from "@/components/layout/sidebar-nav" -import { getBiddingById, getBiddingConditions } from "@/lib/bidding/service" +import { getBiddingById, getBiddingConditions, getActivePaymentTerms, getActiveIncoterms } from "@/lib/bidding/service" import { Bidding } from "@/db/schema/bidding" import { Button } from "@/components/ui/button" import { ArrowLeft } from "lucide-react" @@ -31,6 +31,13 @@ export default async function SettingsLayout({ const bidding: Bidding | null = await getBiddingById(idAsNumber) const biddingConditions = await getBiddingConditions(idAsNumber) + // 3) 옵션 데이터 가져오기 + const paymentTermsResult = await getActivePaymentTerms() + const incotermsResult = await getActiveIncoterms() + + const paymentTermsOptions = paymentTermsResult.success && 'data' in paymentTermsResult ? paymentTermsResult.data || [] : [] + const incotermsOptions = incotermsResult.success && 'data' in incotermsResult ? incotermsResult.data || [] : [] + // 3) 사이드바 메뉴 const sidebarNavItems = [ { @@ -71,9 +78,11 @@ export default async function SettingsLayout({ {/* 입찰 조건 */} {bidding && ( - <BiddingConditionsEdit - biddingId={bidding.id} - initialConditions={biddingConditions} + <BiddingConditionsEdit + biddingId={bidding.id} + initialConditions={biddingConditions} + paymentTermsOptions={paymentTermsOptions} + incotermsOptions={incotermsOptions} /> )} |
